<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改公告')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-post-edit" th:object="${content}">
			<input id="contentId" name="contentId" type="hidden" th:field="*{contentId}"/>
			<div class="form-group">
				<label class="col-sm-3 control-label">公告名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="typeName" id="typeName" th:field="*{contentName}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">有效期开始：</label>
				<div class="col-sm-8">
					<input class="form-control" type="date" name="contentTimeOpen" id="contentTimeOpen" th:field="*{contentTimeOpen}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">有效期结束：</label>
				<div class="col-sm-8">
					<input class="form-control" type="date" name="contentTimeStop" id="contentTimeStop" th:field="*{contentTimeStop}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">公告内容：</label>
				<div class="col-sm-8">
					<textarea style="height: 240px" id="contentBody" name="contentBody" class="form-control">[[*{contentBody}]]</textarea>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="include :: footer" />
	<script type="text/javascript">
		var prefix = ctx + "cms/content";
		
		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/edit", $('#form-post-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
